// BWStitchArray.h -- Key-Value wrapper for a collection of stitches

#import <Cocoa/Cocoa.h>

@class BWStitch;

@interface BWStitchArray : NSObject
{
    NSMutableArray *stitches;
}

- (int) count;

- (NSEnumerator *) objectEnumerator;

- (int) indexOfStitch: (BWStitch *) stitch;
- (BWStitch *) stitchAtIndex: (int) index;

- (void) removeStitch: (BWStitch *) stitch;
- (void) insertStitch: (BWStitch *) stitch 
              atIndex: (int) index;

- (NSArray *) stitchesAtIndexes: (NSIndexSet *) stitchIndexes;
- (void) removeStitchesAtIndexes: (NSIndexSet *) stitchIndexes;
- (void) addStitches: (NSArray *) newStitches
           atIndexes: (NSIndexSet *) stitchIndexes;
- (void) addStitchesFromArrayToBeginning: (NSArray *) newStitches;
- (void) addStitchesFromArray: (NSArray *) newStitches;
- (void) removeLastStitches: (int) count;
- (void) removeFirstStitches: (int) count;
- (void) insertStitches: (NSArray *) stitches
              atIndexes: (NSIndexSet *) indexes;

// for document i/o that's already there
- (NSArray *) stitches;
- (void) setStitches: (NSArray *) stitches;

@end // BWStitchArray
